<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0"/>
    <meta name="apple-mobile-web-app-capable" content="yes"/>
    <meta name="apple-mobile-web-app-status-bar-style" content="black"/>
    <meta name="format-detection" content="telephone=no,email=no"/>
    <meta name="apple-mobile-web-app-title" content="足彩"/>
    <!--这个是本页的链接-->
    <meta property="og:url"                content=""  id="share-url"/>
    <meta property="og:type"               content="article" />
    <meta property="og:title"              content="" id="share-title"/>
    <meta property="og:description"        content="" id="share-desc"/>
    <!--这个是分享的图片-->
    <meta property="og:image"              content="http://img3.redocn.com/tupian/20160216/ertonghuatailimoban_5873437.jpg" />
    <!--这个是测试的appid-->
    <meta property="fb:app_id"             content="119429978931924" />


    <title>detail</title>
    <!--font-awsome-css-->
    <link rel="stylesheet" href="../public/styles/font-awesome.min.css">
    <!--bootstrap-->
    <link rel="stylesheet" href="../public/styles/bootstrap.min.css">
    <!--custom css-->
    <link rel="stylesheet" href="../public/styles/jquery-ui.css" />
    <link rel="stylesheet" href="../public/styles/index.css" />
    <link rel="stylesheet" href="../public/styles/common.css">


</head>
<body>
    <div class="masthead pdng-stn1">
        <!-- 内容开始 -->
        <div class="phone-box wrap push" id="res-raceDetail"></div>
        <script type="text/template" charset="utf-8" id="tpl-raceDetail">
            <div class="banner">
                <div class="race-banner">
                    <div class="banner-title ">
                        <a class="back-link" onclick="back_action()"><i class="fa fa-chevron-left"></i></a>
                        {{= it.event.competitionName}}
                    </div>
                    <div class="banner-con">
                        <span class="ban-left">{{= it.event.homeTeamName}}</span>
                        {{? it.event.state == "0"}}
                            <div class="ban-center center"><img src="../public/images/vs.png" class="ban-vs"></div>
                        {{??}}
                            <div class="ban-center center">
                                <span class="soccer-l">{{= it.event.homeTeamScore}}</span>
                                <img src="../public/images/soccer-vs.png" class="soccer-vs">
                                <span class="soccer-r">{{= it.event.awayTeamScore}}</span>
                            </div>
                        {{?}}
                        <span class="ban-right">{{= it.event.awayTeamName}}</span>
                    </div>
                    <div class="banner-footer">
                        {{? it.event.state == "0"}}
                            <span class="ban-time">{{= $.dateFmt(it.event.eventTime/10000, "yyyy-MM-dd hh:mm")}}</span>
                        {{?? it.event.state == "3"}}
                            <span class="ban-time">TIME: <em id="process-time">{{= $.sec_to_time(new Date().getTime()-it.event.eventTime/10000, "mm:ss")}}</em></span>
                        {{??}}
                            <span class="ban-time">TIME: {{= it.event.caseMinutes}}</span>
                        {{?}}
                    </div>
                </div>
            </div>
            <!-- recommend -->
            <div class="recommend">
            {{? it.event.state == "1" || it.event.state == "5"}}
                <div class="match-fin">
                    <img src="../public/images/finished.png">
                    <p>The Game is Finished</p>
                    <a href="javascript:history.go(-1);" class="btn width60 bets-btn">Back</a>
                </div>
            {{?? }}
                {{? it.market100 && it.market100.selections.length}}
                <table class="remd-list">
                    <tr>
                        <th colspan="3" class="th-orange">3 Way</th>
                    </tr>
                    <tr data-eventId="{{= it.event.eventId}}" data-homeTeamName="{{= it.event.homeTeamName}}" data-awayTeamName="{{= it.event.awayTeamName}}"   data-competitionName="{{= it.event.competitionName}}" >
                        {{~ it.market100.selections :val:ind}}
                        <td class="s bg able race-detail" width="33.333333%" data-Bets="" data-marketId="{{= it.market100.marketId}}" data-ruleType="{{= it.market100.ruleType}}" data-verifyResult="{{= it.market100.verifyResult}}" data-selectionId="{{= val.selectionId}}" data-maxStakeLimit="{{= val.maxStakeLimit}}" data-v1="{{= val.v1}}" data-v2="{{= val.v2}}" data-v3="{{= val.v3}}" data-backOdds="{{= $.numTofixed(val.backOdds)}}">
                            {{? val.selectionId == "1"}}
                                <span class="de-score">Home</span>
                            {{?? val.selectionId == "0"}}
                                <span class="de-score">Draw</span>
                            {{?? val.selectionId == "-1"}}
                                <span class="de-score">Visiting</span>
                            {{?}}
                            <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                        </td>
                        {{~}}
                    </tr>
                </table>
                {{?}}
                {{? it.market130 && it.market130.selections.length}}
                <table class="remd-list">
                    <tr>
                        <th colspan="2" class="th-orange">Odd/Even</th>
                    </tr>
                    <tr data-eventId="{{= it.event.eventId}}"  data-homeTeamName="{{= it.event.homeTeamName}}" data-awayTeamName="{{= it.event.awayTeamName}}"   data-competitionName="{{= it.event.competitionName}}">
                        {{~ it.market130.selections.reverse() :val:ind}}
                        <td class="s bg able race-detail" data-marketId="{{= it.market130.marketId}}" data-ruleType="{{= it.market130.ruleType}}" data-verifyResult="{{= it.market130.verifyResult}}" data-selectionId="{{= val.selectionId}}" data-maxStakeLimit="{{= val.maxStakeLimit}}" data-v1="{{= val.v1}}" data-v2="{{= val.v2}}" data-v3="{{= val.v3}}" data-backOdds="{{= $.numTofixed(val.backOdds)}}">
                            {{? val.selectionId == "-1"}}
                            <span class="de-score">Even</span>
                            {{?? val.selectionId == "1"}}
                            <span class="de-score">Odd</span>
                            {{?}}
                            <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                        </td>
                        {{~}}
                    </tr>
                </table>
                {{?}}

                {{? it.market140 && it.market140.selections.length}}
                <dl class="remd-list remd-dl" data-eventId="{{= it.event.eventId}}"  data-homeTeamName="{{= it.event.homeTeamName}}" data-awayTeamName="{{= it.event.awayTeamName}}"   data-competitionName="{{= it.event.competitionName}}">
                    <dt class="th-orange remd-title">Correct Score</dt>

                    {{~ it.market140.selections :val:ind}}
                    {{? val.selectionId > 4}}
                        <dd class="bg able" data-marketId="{{= it.market140.marketId}}" data-ruleType="{{= it.market140.ruleType}}" data-verifyResult="{{= it.market140.verifyResult}}" data-selectionId="{{= val.selectionId}}" data-maxStakeLimit="{{= val.maxStakeLimit}}" data-v1="{{= val.v1}}" data-v2="{{= val.v2}}" data-v3="{{= val.v3}}" data-backOdds="{{= $.numTofixed(val.backOdds)}}">
                            {{? val.selectionId == 10001}}
                            <span class="de-score">0:0</span>
                            {{?? val.selectionId == 10002}}
                            <span class="de-score">1:0</span>
                            {{?? val.selectionId == 10003}}
                            <span class="de-score">2:0</span>
                            {{?? val.selectionId == 10004}}
                            <span class="de-score">3:0</span>
                            {{?? val.selectionId == 10005}}
                            <span class="de-score">4:0</span>
                            {{?? val.selectionId == 10006}}
                            <span class="de-score">5:0</span>
                            {{?? val.selectionId == 10007}}
                            <span class="de-score">6:0</span>
                            {{?? val.selectionId == 20001}}
                            <span class="de-score">0:1</span>
                            {{?? val.selectionId == 20002}}
                            <span class="de-score">1:1</span>
                            {{?? val.selectionId == 20003}}
                            <span class="de-score">2:1</span>
                            {{?? val.selectionId == 20004}}
                            <span class="de-score">3:1</span>
                            {{?? val.selectionId == 20005}}
                            <span class="de-score">4:1</span>
                            {{?? val.selectionId == 20006}}
                            <span class="de-score">5:1</span>
                            {{?? val.selectionId == 20007}}
                            <span class="de-score">6:1</span>
                            {{?? val.selectionId == 30001}}
                            <span class="de-score">0:2</span>
                            {{?? val.selectionId == 30002}}
                            <span class="de-score">1:2</span>
                            {{?? val.selectionId == 30003}}
                            <span class="de-score">2:2</span>
                            {{?? val.selectionId == 30004}}
                            <span class="de-score">3:2</span>
                            {{?? val.selectionId == 30005}}
                            <span class="de-score">4:2</span>
                            {{?? val.selectionId == 30006}}
                            <span class="de-score">5:2</span>
                            {{?? val.selectionId == 30007}}
                            <span class="de-score">6:2</span>
                            {{?? val.selectionId == 40001}}
                            <span class="de-score">0:3</span>
                            {{?? val.selectionId == 40002}}
                            <span class="de-score">1:3</span>
                            {{?? val.selectionId == 40003}}
                            <span class="de-score">2:3</span>
                            {{?? val.selectionId == 40004}}
                            <span class="de-score">3:3</span>
                            {{?? val.selectionId == 40005}}
                            <span class="de-score">4:3</span>
                            {{?? val.selectionId == 40006}}
                            <span class="de-score">5:3</span>
                            {{?? val.selectionId == 40007}}
                            <span class="de-score">6:3</span>
                            {{?? val.selectionId == 50001}}
                            <span class="de-score">0:4</span>
                            {{?? val.selectionId == 50002}}
                            <span class="de-score">1:4</span>
                            {{?? val.selectionId == 50003}}
                            <span class="de-score">2:4</span>
                            {{?? val.selectionId == 50004}}
                            <span class="de-score">3:4</span>
                            {{?? val.selectionId == 50005}}
                            <span class="de-score">4:4</span>
                            {{?? val.selectionId == 50006}}
                            <span class="de-score">5:4</span>
                            {{?? val.selectionId == 50007}}
                            <span class="de-score">6:4</span>
                            {{?? val.selectionId == 60001}}
                            <span class="de-score">0:5</span>
                            {{?? val.selectionId == 60002}}
                            <span class="de-score">1:5</span>
                            {{?? val.selectionId == 60003}}
                            <span class="de-score">2:5</span>
                            {{?? val.selectionId == 60004}}
                            <span class="de-score">3:5</span>
                            {{?? val.selectionId == 60005}}
                            <span class="de-score">4:5</span>
                            {{?? val.selectionId == 60006}}
                            <span class="de-score">5:5</span>
                            {{?? val.selectionId == 60007}}
                            <span class="de-score">6:5</span>
                            {{?? val.selectionId == 70001}}
                            <span class="de-score">0:6</span>
                            {{?? val.selectionId == 70002}}
                            <span class="de-score">1:6</span>
                            {{?? val.selectionId == 70003}}
                            <span class="de-score">2:6</span>
                            {{?? val.selectionId == 70004}}
                            <span class="de-score">3:6</span>
                            {{?? val.selectionId == 70005}}
                            <span class="de-score">4:6</span>
                            {{?? val.selectionId == 70006}}
                            <span class="de-score">5:6</span>
                            {{?? val.selectionId == 70007}}
                            <span class="de-score">6:6</span>
                            {{?}}

                            <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                        </dd>
                        {{?}}
                        {{~}}

                    <dd class="bg able race-detail" data-marketId="{{= it.market140.marketId}}" data-ruleType="{{= it.market140.ruleType}}" data-verifyResult="{{= it.market140.verifyResult}}" data-selectionId="2">
                        <span class="de-score">Home</span>
                        <span class="de-score orange" id="backOdds_140_0"></span>
                    </dd>
                    <dd class="bg able race-detail" data-marketId="{{= it.market140.marketId}}" data-ruleType="{{= it.market140.ruleType}}" data-verifyResult="{{= it.market140.verifyResult}}" data-selectionId="3">
                        <span class="de-score">Draw</span>
                        <span class="de-score orange" id="backOdds_140_1"></span>
                    </dd>
                    <dd class="bg able race-detail" data-marketId="{{= it.market140.marketId}}" data-ruleType="{{= it.market140.ruleType}}" data-verifyResult="{{= it.market140.verifyResult}}" data-selectionId="4">
                        <span class="de-score">Visiting</span>
                        <span class="de-score orange" id="backOdds_140_2"></span>
                    </dd>
                </dl>

                {{?}}
                {{? it.market350 && it.market350.selections.length}}
                <dl class="remd-list remd-dl" data-eventId="{{= it.event.eventId}}"  data-homeTeamName="{{= it.event.homeTeamName}}" data-awayTeamName="{{= it.event.awayTeamName}}"   data-competitionName="{{= it.event.competitionName}}">
                    <dt class="th-orange remd-title">Next Team To Score</dt>
                    {{~ it.market350.selections :val:ind}}
                    <dd class="bg able race-detail" data-marketId="{{= it.market350.marketId}}" data-ruleType="{{= it.market350.ruleType}}" data-verifyResult="{{= it.market350.verifyResult}}" data-selectionId="{{= val.selectionId}}" data-maxStakeLimit="{{= val.maxStakeLimit}}" data-v1="{{= val.v1}}" data-v2="{{= val.v2}}" data-v3="{{= val.v3}}" data-backOdds="{{= $.numTofixed(val.backOdds)}}">
                        {{? val.selectionId == "1"}}
                            <span class="de-score">Home</span>
                        {{?? val.selectionId == "0"}}
                            <span class=""></span>
                        {{?? val.selectionId == "-1"}}
                            <span class="de-score">Visiting</span>
                        {{?}}
                        <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                    </dd>
                    {{~}}
                </dl>
                {{?}}
                {{? it.market410 && it.market410.selections.length}}
                <dl class="remd-list remd-dl" data-eventId="{{= it.event.eventId}}"  data-homeTeamName="{{= it.event.homeTeamName}}" data-awayTeamName="{{= it.event.awayTeamName}}"   data-competitionName="{{= it.event.competitionName}}">
                    <dt class="th-orange remd-title">Total Goals Exactly</dt>
                    {{~ it.market410.selections :val:ind}}
                    {{? val.selectionId > 0}}
                    <dd class="bg able" data-marketId="{{= it.market410.marketId}}" data-ruleType="{{= it.market410.ruleType}}" data-verifyResult="{{= it.market410.verifyResult}}" data-selectionId="{{= val.selectionId}}" data-maxStakeLimit="{{= val.maxStakeLimit}}" data-v1="{{= val.v1}}" data-v2="{{= val.v2}}" data-v3="{{= val.v3}}" data-backOdds="{{= $.numTofixed(val.backOdds)}}">
                        {{? val.selectionId == 1}}
                        <span class="de-score">0</span>
                        <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                        {{?? val.selectionId == 2}}
                        <span class="de-score">1</span>
                        <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                        {{?? val.selectionId == 3}}
                        <span class="de-score">2</span>
                        <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                        {{?? val.selectionId == 4}}
                        <span class="de-score">3</span>
                        <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                        {{?? val.selectionId == 5}}
                        <span class="de-score">4</span>
                        <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                        {{?? val.selectionId == 6}}
                        <span class="de-score">5</span>
                        <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                        {{?? val.selectionId == 7}}
                        <span class="de-score">6</span>
                        <span class="de-score orange">{{= $.numTofixed(val.backOdds)}}</span>
                        {{?}}
                    </dd>
                    {{?}}
                    {{~}}
                    <dd class="bg able race-detail" data-marketId="{{= it.market410.marketId}}" data-ruleType="{{= it.market410.ruleType}}" data-verifyResult="{{= it.market410.verifyResult}}" data-selectionId="-1">
                        <span class="de-score">More</span>
                        <span class="de-score orange" id="backOdds_410_1"></span>
                    </dd>
                </dl>
                {{?}}

            {{?}}
            </div>
        </script>


    </div>


    <!-- 按钮触发模态框 -->
    <!--<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#logup">注册</button>-->
    <!--<button class="btn btn-primary btn-lg" data-toggle="modal" data-target="#reset">重置密码</button>-->
    <!-- 登录模态框（Modal） -->
    <div class="modal fade" id="login" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog login-box modal-top">
            <div class="modal-content login-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title center">LOGIN</h4>
                </div>
                <div class="modal-body">
                    <input type="text" class="form-control" placeholder="Tel Number" name="accountNumber">
                    <input type="password" class="form-control" placeholder="Password" name="password">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn login-btn " id="login-submit">LOGIN</button>
                    <span class="link reset">Forget Password？</span>
                    <span class="link logup pull-right">Logup？</span>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>

    <!-- 注册模态框（Modal） -->
    <div class="modal fade" id="logup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog login-box modal-top">
            <div class="modal-content login-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title center">REGISTER</h4>
                </div>
                <div class="modal-body">
                    <input type="text" class="form-control" placeholder="Tel Number" name="userPhone">
                    <label>
                        <input type="text" class="form-control width70" placeholder="Verification Code" name="userCode">
                        <a href="javascript:;" class="smsSend" id="smsSend">SEND</a>
                    </label>
                    <input type="password" class="form-control" placeholder="Password" name="passWord">
                    <p><span class="agress"style="width: 2rem ;height: 2rem;margin-bottom: 1.5rem"></span>
                        <a href="custom-service.html" class="white"style="margin-left: 1.5rem">Agree《General Terms & Conditions》</a></p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn login-btn" id="logup-btn"style="margin-top: 1rem">REGISTER</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>

    <!-- 重置密码模态框（Modal） -->
    <div class="modal fade" id="reset" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog login-box modal-top">
            <div class="modal-content login-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title center">Set the Password</h4>
                </div>
                <div class="modal-body">
                    <input type="text" class="form-control" placeholder="Tel Number" name="userPhone2">
                    <label>
                        <input type="text" class="form-control width70" placeholder="Verification Code" name="userCode2">
                        <a href="javascript:;" class="smsSend" id="re-smsSend">SEND</a>
                    </label>
                    <input type="password" class="form-control" placeholder="Repeat My Password" name="newPassWord">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn login-btn reset-btn">CONFIRM</button>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal -->
    </div>

    <!-- 登录失败 -->
    <div class="modal fade" id="login-fail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
        <div class="modal-dialog login-box modal-top">
            <div class="modal-content login-content">
                <div class="modal-body login-fail">
                    <h5>LOGIN FAILED</h5>
                    <p id="login_fail_msg" class="orange">The Password is Wrong</p>
                </div>
                <div class="modal-footer betSuc-footer">
                    <button type="button" data-dismiss="modal" class="btn login-btn fail-btn">OK</button>
                </div>
            </div>
        </div>
    </div>

    <!-- 底部分享框（Modal） -->
    <!-- loading -->
    <!--<div class="ind-loading" id="ind-loading" style="display: block;">-->
    <!--<div class="spinner">-->
    <!--<div class="bubble-1"></div>-->
    <!--<div class="bubble-2"></div>-->
    <!--</div>-->
    <!--</div>-->

    <script type="text/javascript" src="../public/scripts/vendor/jquery-2.1.4.min.js"></script>
    <script type="text/javascript" src="../public/scripts/vendor/bootstrap.min.js"></script>
    <script type="text/javascript" src="../public/scripts/vendor/jquery.cookie.js"></script>
    <script type="text/javascript" src="../public/scripts/vendor/doT.min.js"></script>
    <script type="text/javascript" src="../public/scripts/common.js"></script>
    <script type="text/javascript">
        /* loading */
        var loading = '<div class="ind-loading" id="ind-loading" style="display: block;">'+
                '<div class="spinner">'+
                '<div class="bubble-1"></div>'+
                '<div class="bubble-2"></div>'+
                '</div>'+
                '</div>';
        $('body').append(loading);



        function upDate(time){
            var process = new Date().getTime() - time;
            if(process <= 10800000){
                var m = parseInt(process/1000/60);
                var s = parseInt(process/1000%60);
                if(s<10){
                    s = "0"+s;
                }
                if(m<10){
                    m = "0"+m;
                }
                $('#process-time').html(m+":"+s);
//                $('#process-time').html($.dateFmt(process, "mm:ss"));
                setTimeout(function(){upDate(time)}, 1000);
            } else {

            }
        }

        function searchSelect(){
            var marketid = $.getQueryString('marketid');
            var selectionid = $.getQueryString('selectionid');

            if(marketid && selectionid){
                $('.recommend .able').each(function(index, item){
                    if($(item).data('marketid') ==marketid && $(item).data('selectionid') == selectionid){
                        $(item).addClass('active')
                    }
                })
            }
        }

        function back_action() {

            var back_url = document.referrer;

            if(back_url.indexOf('bocai-web') > -1){
                window.history.go(-1);
            }else {
                window.location.href='index.html';
            }
        }


        $(document).ready(function() {
            /* 设置mete 分享图片功能 */
            var url = window.location.href
            var domain = url.slice(0,url.lastIndexOf('/'));
            $('#share-url').attr('content',domain+"/race-detail.html");
            $('#share-title').attr('content', $.getQueryString('share-title'));
            $('#share-desc').attr('content', $.getQueryString('share-desc'));


            var eventId = $.getQueryString('eventId');
            $.ajax({
                type: 'get',
                url: apiDomain + '/order/getMarketList?' + new Date().getTime(),
                dataType: "json",
                cache: false,
                data: {eventId: eventId,evented: 1,enabled: 0, opend:0},
                success: function (data) {

                    $('#ind-loading').css('display', 'none');
                    if (data.code == "0") {
//                  渲染模版
                        var tpl = doT.template($("#tpl-raceDetail").html());
                        $("#res-raceDetail").html(tpl(data.results));
                        $.detailObj = data.results;
                        //判断比赛时间
                        if(data.results.event.eventTime/10000 < new Date().getTime()){
                            upDate(data.results.event.eventTime/10000);
                        }
                        $('#backOdds_140_0').html($.numTofixed($.getSelect(data.results, 140, 2).backOdds));
                        $('#backOdds_140_1').html($.numTofixed($.getSelect(data.results, 140, 3).backOdds));
                        $('#backOdds_140_2').html($.numTofixed($.getSelect(data.results, 140, 4).backOdds));
                        $('#backOdds_410_1').html($.numTofixed($.getSelect(data.results, 410, -1).backOdds));
                        //判断是不是分享出的页面
                        searchSelect();
                    } else {
                        //简单提示框
                        $.blt(data.msg);
                    }
                }
            })

            //忘记密码
            $('body').on('click', '.reset', function(){
                $('#login').modal('hide');
                $('#reset').modal('show');
            })
            //注册
            $('body').on('click', '.logup', function(){
                $('#login').modal('hide');
                $('#logup').modal('show');
            })
            //注册提交
            $('body').on('click', '#logup-btn', function(){
                $.register();
            })

            $('body').on('click', '.agress', function(){
                $(this).toggleClass('agreed');
            })

            //登录提交
            $('body').on('click', '#login-submit', function(){

                var accountNumber = $('input[name="accountNumber"]').val();
                var password = $('input[name="password"]').val();
                $.login(accountNumber,password);
            })



            if($.cookie('userReadMessageState')=="0"){
                $('.news-tip').show();
            }else{
                $('.news-tip').hide();
            }
            $('body').on('click', '#smsSend', function(){
                $.getCode($('input[name="userPhone"]'));
            })
            $('body').on('click', '#re-smsSend', function(){
                $.getCode($('input[name="userPhone2"]'));
            })

            $('body').on('click', '.reset-btn', function(){
                $.reset();
            })
        })

    </script>
</body>
</html>